package com.xhb.ui.tools;

import java.io.File;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;

public class LogFormat {

	public static  Logger logger = Logger.getLogger("easy_borwser");
	
	
	public static void init() {
		try {
			File logFile=new File("C://zgymw//easy_borwser.log");
			if(!logFile.exists()) {
				logFile.createNewFile();
			}
			FileHandler  fh = new FileHandler(logFile.getPath(), true);
			logger.addHandler(fh);
		    SimpleFormatter formatter = new SimpleFormatter();  
		    fh.setFormatter(formatter);  
		    logger.setLevel(Level.ALL);
		    
		    logger.info("START SUCCRSS");
		} catch (Exception e) {
			e.printStackTrace();
		} 
	}
	
	public static void info(String msg) {
		logger.info(msg);
	}
}
